package com.example.nuc_ms_beta.ui.viewconstruction.adapter;

import android.content.Context;

import com.example.nuc_ms_beta.R;
import com.example.nuc_ms_beta.bean.HumanLecture.HumanLecture;
import com.yuyh.easyadapter.abslistview.EasyLVAdapter;
import com.yuyh.easyadapter.abslistview.EasyLVHolder;

import java.util.List;

/**
 * Created by bnhc on 17-5-25.
 */

public class HumanLectureListViewAdapter extends EasyLVAdapter<HumanLecture> {
    public HumanLectureListViewAdapter(Context context, List<HumanLecture> list, int... layoutIds) {
        super(context, list, layoutIds);
    }

    public HumanLectureListViewAdapter(Context context, List<HumanLecture> list) {
        super(context, list);
    }

    @Override
    public void convert(EasyLVHolder holder, int position, HumanLecture humanLecture) {
        //user Image
//      holder.setImageUrl(R.id.humanlecture_listview_item_user_iv, humanLecture.getListview_user_image().getUrl());
        //user Name
        holder.setText(R.id.humanlecture_listview_item_user_name, humanLecture.getListview_user_name());
        //data
        holder.setText(R.id.humanlecture_listview_item_date, humanLecture.getListview_data());
        //title
        holder.setText(R.id.humanlecture_listview_item_title, humanLecture.getListview_title());
        //content
        holder.setText(R.id.humanlecture_listview_item_content, humanLecture.getListview_sim_content());
        //num_person
        holder.setText(R.id.humanlecture_listview_item_person, String.valueOf(humanLecture.getListivew_num_person()));
        //into_person
        holder.setText(R.id.humanlecture_listview_item_into_person, String.valueOf(humanLecture.getListview_in_person()));
        //like_person
        holder.setText(R.id.humanlecture_listview_item_like, String.valueOf(humanLecture.getListivew_num_like()));
    }
}
